package com.yunshang.shoppingmall.service.impl;

import com.yunshang.shoppingmall.entity.Activity;
import com.yunshang.shoppingmall.entity.UserNo;
import com.yunshang.shoppingmall.mapper.ActivityMapper;
import com.yunshang.shoppingmall.mapper.UserNoMapper;
import com.yunshang.shoppingmall.service.SysUserNoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service("sysUserNoService")
public class SysUserNoServiceImpl implements SysUserNoService {


    @Autowired
    UserNoMapper userNoMapper;

    @Autowired
    ActivityMapper activityMapper;

    @Override
    public int deleteByPrimaryKey(Integer id) {
        return userNoMapper.deleteByPrimaryKey(id);
    }

    @Override
    public int insert(UserNo userNo) {
        return userNoMapper.insert(userNo);
    }

    @Override
    public int insertSelective(UserNo record) {
        return userNoMapper.insertSelective(record);
    }

    @Override
    public UserNo selectByPrimaryKey(Integer id) {

        return userNoMapper.selectByPrimaryKey(id);
    }

    @Override
    public int updateByPrimaryKeySelective(UserNo record) {
        return userNoMapper.updateByPrimaryKeySelective(record);
    }

    @Override
    public int updateByPrimaryKey(UserNo record) {
        return userNoMapper.updateByPrimaryKey(record);
    }

    @Override
    public int updateOpenid(UserNo record) {
        return userNoMapper.updateOpenid(record);
    }

    @Override
    public UserNo selectUserNoByUserNo(String userNo) {
        return userNoMapper.selectUserNoByUserNo(userNo);
    }

    @Override
    public UserNo selectUserNoByOpenid(String openid){return userNoMapper.selectUserNoByOpenid(openid);};

    @Override
    public List<UserNo> selectUserNoByUserId(int userId) {
        return userNoMapper.selectUserNoByUserId(userId);
    }


    @Override
    public int updatePwdByUserNo(UserNo userNo) {
        return userNoMapper.updatePwdByUserNo(userNo);
    }

    @Override
    public List<UserNo> selectAllNextUserNoByRecommend(int userNoId) {
        return userNoMapper.selectAllNextUserNoByRecommend(userNoId);
    }

    @Override
    public List<UserNo> selectUserNoList() {
        return userNoMapper.selectUserNoList();
    }

    @Override
    public int selectUserNoCount() {
        return userNoMapper.selectUserNoCount();
    }

    @Override
    public List<UserNo> selectRecommendListByUserNoId(UserNo userNo) {
        return userNoMapper.selectRecommendListByUserNoId(userNo);
    }

    @Override
    public List<UserNo> selectUserListByUserNoOrName(UserNo userNo) {
        return userNoMapper.selectUserListByUserNoOrName(userNo);
    }

    @Override
    public List<UserNo> selectUserNoListUserNo() {
        return userNoMapper.selectUserNoListUserNo();
    }

    @Override
    public List<UserNo> ActivityList(int guige) {
        return userNoMapper.ActivityList(guige);
    }

    @Override
    public int ActivitySum(int guige) {
        return userNoMapper.ActivitySum(guige);
    }

    @Override
    public int ActivityUserNoSum(int id, int guige) {
        return userNoMapper.ActivityUserNoSum(id,guige);
    }

    @Override
    public List<UserNo> WActivityList() {
        return userNoMapper.WActivityList();
    }

    @Override
    public int WActivitySum() {
        return userNoMapper.WActivitySum();
    }

    @Override
    public int WActivityUserNoSum(int uid) {
        return userNoMapper.WActivityUserNoSum(uid);
    }

    @Override
    public List<Activity> WActivityUserNoDetails(int uid) {
        return activityMapper.WActivityUserNoDetails(uid);
    }


}
